<template>
  <div class="html">
    <start-project-header></start-project-header>
    <div class="twoOfThree">
      <span>2 of 3</span>
    </div>
    <div class="main">
      <span>Describe what you’ll be creating.</span>
      <span>And don’t worry, you can edit this later, too.</span>
    </div>
      <div class="text">
        <textarea  placeholder="A novel written in three languages." v-model="textareaTxt" @keypress="pressNum"/>
        <span>{{startNum}}/{{endNum}}</span>
      </div>
    <div class="nextButton">
      <span>Category</span>
    <input type="button" value="Next:Location"/>
    </div>



  </div>
</template>

<script>
  import startProjectHeader from '../public/StartProjectHeader'

    export default {
        name: "start-project-two",
        components:{ startProjectHeader },
        data() {
            return{
              textareaTxt:'',
              startNum:0,
              endNum:135,
            }
        },
        methods:{
            pressNum() {
                if(this.startNum<135){
                    event.returnValue = true;
                    this.startNum = this.textareaTxt.length;
                }
                else {
                    event.returnValue = false;
                }
            }
        },
    }
</script>

<style scoped lang="scss">
  .html{
    width: 100vw;
    padding: 0 75px;
    box-sizing: border-box;
  }
  .twoOfThree{
    display: flex;
    justify-items: left;
    span{
      display: block;
      line-height: 28px;
      font-size:20px;
      color:#2E2E2E;
    }
  }
  .main{
    display: flex;
    width: 700px;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    text-align: center;
    span:nth-child(1){
      margin-top: 122px;
      font-size:36px;
      color:#2E2E2E;
      height: 50px;
    }
    span:nth-child(2){

      height: 66px;
      font-size:24px;
      color:#666666;
      margin: 20px 0;
      text-align: center;
    }
  }
  .text{
    width: 700px;
    margin: 0 auto;
    background: #FFFFFF;
    border-bottom:2px solid #DBDEDD;;
    textarea{
      width: 700px;
      height: 90px;
      font-size:20px;

      padding: 10px 20px;
      outline: none;
      border: 1px solid #DBDEDD;
      box-sizing: border-box;
      resize: none;
      ::-webkit-input-placeholder{color: #999999;}
      &:focus{border: 1px solid #A07EFF}
    }
    span{
      font-size: 18px;
      color: #808080;
      display: block;
      width: 700px;
      text-align:right;
      margin: 5px 0 10px 0;
    }
  }
  .nextButton{
    width: 700px;
    margin: 20px auto;
    span{
      display: inline-block;
      font-size:20px;
      color:#808080;
      margin-left: 32px;
    }
    input{
      outline: none;
      border: none;
      color:#FFFFFF;
      font-size:18px;
      background: rgba(0,0,0,0.15);
      width:174px;
      height:50px;
      padding-left: 10px;
      box-sizing: border-box;
      border-radius:5px;
      float: right;
      &:active{
        background-color:#333333;
      }
    }
  }
</style>
